package com.yuw.oop.extendsdemo;

public class Dog extends Animal {
	// 扩展新属性
	private String color;

	// 扩展新行为

	/**
	 * 表演杂技的行为
	 */
	public void showItself() {
		System.out.println("dog shows itself...");
	}

	/////////////////////////////////////////////

	public Dog() {
		super();
	}

	public Dog(String animalName, String animalSex, double animalAge) {
		super(animalName, animalSex, animalAge);
	}

	public Dog(String animalName, String animalSex, double animalAge, String color) {
		super(animalName, animalSex, animalAge); // 调动了父类的构造方法
		this.color = color;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

}
